In recent years, numerous technologies of image processing apparatuses that process image data in accordance with the user's request have been developed. For example, there is a multifunction peripheral which reads a paper document in which the location to be edited on is marked in advance, digitizes the document with a reading control unit, and identifies the text string of the marked location from the results of the text string information identified with an OCR control unit and position/range information of the mark detected with a mark identification unit. This multifunction peripheral digitizes the replacement-designated document on which the substitute text string is written with a reading control unit, stores the result in a memory, and identifies the text string to be replaced from the digitized image by using the OCR control unit. Furthermore, the multifunction peripheral replaces the marked text string with the substitute text string while simultaneously correcting the layout so that it will become the user's intended layout by using a reconfiguration control unit. By so doing, it is possible to simultaneously replace the marked text string and the substitute text string and correct the layout of the overall document image, and the user can obtain the intended image irrespective of the wording of the substitute document.